#include "file_common.h"

#ifndef ENODE_CANT
#define ENODE_CANT ((SECTOR_SIZE-sizeof(unsigned int))/sizeof(eNode))

typedef struct eNode eNode;
struct eNode {
	char name[FILE_NAME];
	unsigned int sector;
}__attribute__((packed));

typedef struct DirData DirData;
struct DirData{	
	unsigned int eNodeCant;
	eNode list[ENODE_CANT];
}__attribute__((packed));

#endif


int isLastNode(char * path);
int getFirstNode(char * ret, char * path);
void getCola(char * ret, char * path);
int getLastNode(char * ret, char * path);
int isAbsolutePath(char * path);
void withoutLastNode(char * ret, char * path);
void getParentPath(char * ret, char * path);
void add_enode(int fd ,char * new_file_name, unsigned int child_sector);
int recursivePath(char * path);
void getLinkPath(char * path);
void getParentLinkPath(char * path);